﻿
/*----------------------------------------------------------------//
// 文件名：MoBranchInfo.cs
// 文件功能描述：实体 MoBranchInfo.
// 
// 创建标识：Template  ver 5.0.20090429 2009-07-11
//
// 修改标识：
// 修改描述：
//----------------------------------------------------------------*/
#region MoBranchInfo
using System;
using System.Data;
namespace Las.Model
{
	/// <summary>
	/// 业务实体MoBranchInfo
	/// </summary>
	public partial class MoBranchInfo:ICloneable
	{
		#region 表BranchInfo的字段
		private string branchId;
		private string parentBranchId;
		private string armType;
		private string specialtyPhase;
		private string branchName;
		private string branchShortName;
		private string isdept;
		private string isdel;
		private string canlog;
		private string minBranchId;
		private string rank;
		private string trainall;
		private int bzs;
		private int gbbzs;
		private int zsbzs;
		private string lnndcj;
		private string lndjpd;
		private string lnhdry;
		private string lnjcjs;
		private string lncjdxhd;
		#endregion
		
		#region 构造函数
		public MoBranchInfo()
		{
			                     	    
		   
		}
		#endregion
		
		#region 拷贝构造函数

		public MoBranchInfo(MoBranchInfo item)
		{
			item.CopyTo(this);
		}
		#endregion
		
		#region 带参数构造函数
	    public MoBranchInfo(string branchId,string parentBranchId,string armType,string specialtyPhase,string branchName,string branchShortName,string isdept,string isdel,string canlog,string minBranchId,string rank,string trainall,int bzs,int gbbzs,int zsbzs,string lnndcj,string lndjpd,string lnhdry,string lnjcjs,string lncjdxhd)
		{
		this.branchId=branchId;
		this.parentBranchId=parentBranchId;
		this.armType=armType;
		this.specialtyPhase=specialtyPhase;
		this.branchName=branchName;
		this.branchShortName=branchShortName;
		this.isdept=isdept;
		this.isdel=isdel;
		this.canlog=canlog;
		this.minBranchId=minBranchId;
		this.rank=rank;
		this.trainall=trainall;
		this.bzs=bzs;
		this.gbbzs=gbbzs;
		this.zsbzs=zsbzs;
		this.lnndcj=lnndcj;
		this.lndjpd=lndjpd;
		this.lnhdry=lnhdry;
		this.lnjcjs=lnjcjs;
		this.lncjdxhd=lncjdxhd;
		}
		#endregion
		
		#region 表BranchInfo的字段属性
		/// <summary>
		/// BRANCH_ID
		/// </summary>
		public string BranchId
		{
			get {return branchId;}
			set {branchId=value;}
		}
		/// <summary>
		/// PARENT_BRANCH_ID
		/// </summary>
		public string ParentBranchId
		{
			get {return parentBranchId;}
			set {parentBranchId=value;}
		}
		/// <summary>
		/// ARM_TYPE
		/// </summary>
		public string ArmType
		{
			get {return armType;}
			set {armType=value;}
		}
		/// <summary>
		/// SPECIALTY_PHASE
		/// </summary>
		public string SpecialtyPhase
		{
			get {return specialtyPhase;}
			set {specialtyPhase=value;}
		}
		/// <summary>
		/// BRANCH_NAME
		/// </summary>
		public string BranchName
		{
			get {return branchName;}
			set {branchName=value;}
		}
		/// <summary>
		/// BRANCH_SHORT_NAME
		/// </summary>
		public string BranchShortName
		{
			get {return branchShortName;}
			set {branchShortName=value;}
		}
		/// <summary>
		/// ISDEPT
		/// </summary>
		public string Isdept
		{
			get {return isdept;}
			set {isdept=value;}
		}
		/// <summary>
		/// ISDEL
		/// </summary>
		public string Isdel
		{
			get {return isdel;}
			set {isdel=value;}
		}
		/// <summary>
		/// CANLOG
		/// </summary>
		public string Canlog
		{
			get {return canlog;}
			set {canlog=value;}
		}
		/// <summary>
		/// MIN_BRANCH_ID
		/// </summary>
		public string MinBranchId
		{
			get {return minBranchId;}
			set {minBranchId=value;}
		}
		/// <summary>
		/// RANK
		/// </summary>
		public string Rank
		{
			get {return rank;}
			set {rank=value;}
		}
		/// <summary>
		/// TRAINALL
		/// </summary>
		public string Trainall
		{
			get {return trainall;}
			set {trainall=value;}
		}
		/// <summary>
		/// BZS
		/// </summary>
		public int Bzs
		{
			get {return bzs;}
			set {bzs=value;}
		}
		/// <summary>
		/// GBBZS
		/// </summary>
		public int Gbbzs
		{
			get {return gbbzs;}
			set {gbbzs=value;}
		}
		/// <summary>
		/// ZSBZS
		/// </summary>
		public int Zsbzs
		{
			get {return zsbzs;}
			set {zsbzs=value;}
		}
		/// <summary>
		/// LNNDCJ
		/// </summary>
		public string Lnndcj
		{
			get {return lnndcj;}
			set {lnndcj=value;}
		}
		/// <summary>
		/// LNDJPD
		/// </summary>
		public string Lndjpd
		{
			get {return lndjpd;}
			set {lndjpd=value;}
		}
		/// <summary>
		/// LNHDRY
		/// </summary>
		public string Lnhdry
		{
			get {return lnhdry;}
			set {lnhdry=value;}
		}
		/// <summary>
		/// LNJCJS
		/// </summary>
		public string Lnjcjs
		{
			get {return lnjcjs;}
			set {lnjcjs=value;}
		}
		/// <summary>
		/// LNCJDXHD
		/// </summary>
		public string Lncjdxhd
		{
			get {return lncjdxhd;}
			set {lncjdxhd=value;}
		}
		#endregion
		
		#region 辅助函数
		/// <summary>
		/// 拷贝函数
		/// </summary>
		public MoBranchInfo CopyTo(MoBranchInfo item)
        {
		    item.branchId=this.branchId;
		    item.parentBranchId=this.parentBranchId;
		    item.armType=this.armType;
		    item.specialtyPhase=this.specialtyPhase;
		    item.branchName=this.branchName;
		    item.branchShortName=this.branchShortName;
		    item.isdept=this.isdept;
		    item.isdel=this.isdel;
		    item.canlog=this.canlog;
		    item.minBranchId=this.minBranchId;
		    item.rank=this.rank;
		    item.trainall=this.trainall;
		    item.bzs=this.bzs;
		    item.gbbzs=this.gbbzs;
		    item.zsbzs=this.zsbzs;
		    item.lnndcj=this.lnndcj;
		    item.lndjpd=this.lndjpd;
		    item.lnhdry=this.lnhdry;
		    item.lnjcjs=this.lnjcjs;
		    item.lncjdxhd=this.lncjdxhd;
			return item;
        }
		/// <summary>
		/// 克隆函数
		/// </summary>		
		public object Clone()
        {
            MoBranchInfo mo=new MoBranchInfo();
		    mo.BranchId=this.BranchId;
		    mo.ParentBranchId=this.ParentBranchId;
		    mo.ArmType=this.ArmType;
		    mo.SpecialtyPhase=this.SpecialtyPhase;
		    mo.BranchName=this.BranchName;
		    mo.BranchShortName=this.BranchShortName;
		    mo.Isdept=this.Isdept;
		    mo.Isdel=this.Isdel;
		    mo.Canlog=this.Canlog;
		    mo.MinBranchId=this.MinBranchId;
		    mo.Rank=this.Rank;
		    mo.Trainall=this.Trainall;
		    mo.Bzs=this.Bzs;
		    mo.Gbbzs=this.Gbbzs;
		    mo.Zsbzs=this.Zsbzs;
		    mo.Lnndcj=this.Lnndcj;
		    mo.Lndjpd=this.Lndjpd;
		    mo.Lnhdry=this.Lnhdry;
		    mo.Lnjcjs=this.Lnjcjs;
		    mo.Lncjdxhd=this.Lncjdxhd;
			return mo;
		}
				///<summary>
		///判断对象是否相等
		///<summary>
		public override bool Equals(object obj)
        {		 
            if (object.ReferenceEquals(this,obj))
            {
                return true;
            }
            else
            {
                MoBranchInfo NewBranchInfo = obj as MoBranchInfo;
                if (NewBranchInfo == null)
                {
                    return false;
                }
                else
                {
				if (NewBranchInfo.BranchId==this.BranchId && NewBranchInfo.ParentBranchId==this.ParentBranchId && NewBranchInfo.ArmType==this.ArmType && NewBranchInfo.SpecialtyPhase==this.SpecialtyPhase && NewBranchInfo.BranchName==this.BranchName && NewBranchInfo.BranchShortName==this.BranchShortName && NewBranchInfo.Isdept==this.Isdept && NewBranchInfo.Isdel==this.Isdel && NewBranchInfo.Canlog==this.Canlog && NewBranchInfo.MinBranchId==this.MinBranchId && NewBranchInfo.Rank==this.Rank && NewBranchInfo.Trainall==this.Trainall && NewBranchInfo.Bzs==this.Bzs && NewBranchInfo.Gbbzs==this.Gbbzs && NewBranchInfo.Zsbzs==this.Zsbzs && NewBranchInfo.Lnndcj==this.Lnndcj && NewBranchInfo.Lndjpd==this.Lndjpd && NewBranchInfo.Lnhdry==this.Lnhdry && NewBranchInfo.Lnjcjs==this.Lnjcjs && NewBranchInfo.Lncjdxhd==this.Lncjdxhd)		
					{
                        return true; 
                    }
                }

            }
            return false;
            
        }
		///TODO:you should modify GetHashCode by yourself.
		public override int GetHashCode()
		{
			return base.GetHashCode();
		} 

		public override string ToString()
        {
		   return String.Format(System.Globalization.CultureInfo.InvariantCulture,"BranchId={0}/ParentBranchId={1}/ArmType={2}/SpecialtyPhase={3}/BranchName={4}/BranchShortName={5}/Isdept={6}/Isdel={7}/Canlog={8}/MinBranchId={9}/Rank={10}/Trainall={11}/Bzs={12}/Gbbzs={13}/Zsbzs={14}/Lnndcj={15}/Lndjpd={16}/Lnhdry={17}/Lnjcjs={18}/Lncjdxhd={19}",branchId,parentBranchId,armType,specialtyPhase,branchName,branchShortName,isdept,isdel,canlog,minBranchId,rank,trainall,bzs,gbbzs,zsbzs,lnndcj,lndjpd,lnhdry,lnjcjs,lncjdxhd);
		 
		}
		#endregion
		
		
		#region DataTable Help Function
		///<summary>
		///DataRow转换成Model
		///</summary>
		public void Row2Model(DataRow row)
		{
		    if(row["BRANCH_ID"]!=null && row["BRANCH_ID"]!=DBNull.Value)
			{
			    this.BranchId = (string)row["BRANCH_ID"];
			}
			else
			{
				this.BranchId =string.Empty;
			}
		    if(row["PARENT_BRANCH_ID"]!=null && row["PARENT_BRANCH_ID"]!=DBNull.Value)
			{
			    this.ParentBranchId = (string)row["PARENT_BRANCH_ID"];
			}
			else
			{
				this.ParentBranchId =string.Empty;
			}
		    if(row["ARM_TYPE"]!=null && row["ARM_TYPE"]!=DBNull.Value)
			{
			    this.ArmType = (string)row["ARM_TYPE"];
			}
			else
			{
				this.ArmType =string.Empty;
			}
		    if(row["SPECIALTY_PHASE"]!=null && row["SPECIALTY_PHASE"]!=DBNull.Value)
			{
			    this.SpecialtyPhase = (string)row["SPECIALTY_PHASE"];
			}
			else
			{
				this.SpecialtyPhase =string.Empty;
			}
		    if(row["BRANCH_NAME"]!=null && row["BRANCH_NAME"]!=DBNull.Value)
			{
			    this.BranchName = (string)row["BRANCH_NAME"];
			}
			else
			{
				this.BranchName =string.Empty;
			}
		    if(row["BRANCH_SHORT_NAME"]!=null && row["BRANCH_SHORT_NAME"]!=DBNull.Value)
			{
			    this.BranchShortName = (string)row["BRANCH_SHORT_NAME"];
			}
			else
			{
				this.BranchShortName =string.Empty;
			}
		    if(row["ISDEPT"]!=null && row["ISDEPT"]!=DBNull.Value)
			{
			    this.Isdept = (string)row["ISDEPT"];
			}
			else
			{
				this.Isdept =string.Empty;
			}
		    if(row["ISDEL"]!=null && row["ISDEL"]!=DBNull.Value)
			{
			    this.Isdel = (string)row["ISDEL"];
			}
			else
			{
				this.Isdel =string.Empty;
			}
		    if(row["CANLOG"]!=null && row["CANLOG"]!=DBNull.Value)
			{
			    this.Canlog = (string)row["CANLOG"];
			}
			else
			{
				this.Canlog =string.Empty;
			}
		    if(row["MIN_BRANCH_ID"]!=null && row["MIN_BRANCH_ID"]!=DBNull.Value)
			{
			    this.MinBranchId = (string)row["MIN_BRANCH_ID"];
			}
			else
			{
				this.MinBranchId =string.Empty;
			}
		    if(row["RANK"]!=null && row["RANK"]!=DBNull.Value)
			{
			    this.Rank = (string)row["RANK"];
			}
			else
			{
				this.Rank =string.Empty;
			}
		    if(row["TRAINALL"]!=null && row["TRAINALL"]!=DBNull.Value)
			{
			    this.Trainall = (string)row["TRAINALL"];
			}
			else
			{
				this.Trainall =string.Empty;
			}
		    if(row["BZS"]!=null && row["BZS"]!=DBNull.Value)
			{
			    this.Bzs = (int)row["BZS"];
			}
			else
			{
				this.Bzs =0;
			}
		    if(row["GBBZS"]!=null && row["GBBZS"]!=DBNull.Value)
			{
			    this.Gbbzs = (int)row["GBBZS"];
			}
			else
			{
				this.Gbbzs =0;
			}
		    if(row["ZSBZS"]!=null && row["ZSBZS"]!=DBNull.Value)
			{
			    this.Zsbzs = (int)row["ZSBZS"];
			}
			else
			{
				this.Zsbzs =0;
			}
		    if(row["LNNDCJ"]!=null && row["LNNDCJ"]!=DBNull.Value)
			{
			    this.Lnndcj = (string)row["LNNDCJ"];
			}
			else
			{
				this.Lnndcj =string.Empty;
			}
		    if(row["LNDJPD"]!=null && row["LNDJPD"]!=DBNull.Value)
			{
			    this.Lndjpd = (string)row["LNDJPD"];
			}
			else
			{
				this.Lndjpd =string.Empty;
			}
		    if(row["LNHDRY"]!=null && row["LNHDRY"]!=DBNull.Value)
			{
			    this.Lnhdry = (string)row["LNHDRY"];
			}
			else
			{
				this.Lnhdry =string.Empty;
			}
		    if(row["LNJCJS"]!=null && row["LNJCJS"]!=DBNull.Value)
			{
			    this.Lnjcjs = (string)row["LNJCJS"];
			}
			else
			{
				this.Lnjcjs =string.Empty;
			}
		    if(row["LNCJDXHD"]!=null && row["LNCJDXHD"]!=DBNull.Value)
			{
			    this.Lncjdxhd = (string)row["LNCJDXHD"];
			}
			else
			{
				this.Lncjdxhd =string.Empty;
			}
		}
		
		///<summary>
		///Model转换成DataRow
		///</summary>
	　　public void Model2Row(DataRow row)
		{
			row["BRANCH_ID"] = this.BranchId;
			row["PARENT_BRANCH_ID"] = this.ParentBranchId;
			row["ARM_TYPE"] = this.ArmType;
			row["SPECIALTY_PHASE"] = this.SpecialtyPhase;
			row["BRANCH_NAME"] = this.BranchName;
			row["BRANCH_SHORT_NAME"] = this.BranchShortName;
			row["ISDEPT"] = this.Isdept;
			row["ISDEL"] = this.Isdel;
			row["CANLOG"] = this.Canlog;
			row["MIN_BRANCH_ID"] = this.MinBranchId;
			row["RANK"] = this.Rank;
			row["TRAINALL"] = this.Trainall;
			row["BZS"] = this.Bzs;
			row["GBBZS"] = this.Gbbzs;
			row["ZSBZS"] = this.Zsbzs;
			row["LNNDCJ"] = this.Lnndcj;
			row["LNDJPD"] = this.Lndjpd;
			row["LNHDRY"] = this.Lnhdry;
			row["LNJCJS"] = this.Lnjcjs;
			row["LNCJDXHD"] = this.Lncjdxhd;
		}
		#endregion
	}
}
#endregion
